#[derive(Debug,PartialEq)]
pub enum TokenType {
    ConstDeduceNum,
    ///操作符
    Operator(Operator),
    ///类型关键字
    KeyWord(KeyWord),
    ///判断符号
    Compared(Compared),
    //自定义函数名，自定义对象名之类的
    Identifier(String),
    //注释文档
    CommentDoc(String),
    //
    VarType(String),
    //.引用子元素关键字
    Dot,
    //常量字符
    ConstString(String),
    //常量数字
    ConstNumber(i32),
    //
    ConstLong(i64),
    //
    ConstLongLong(i128),
    //常量浮点数
    ConstFloat(f32),
    ConstBool(bool),
    //(
    FuncBegin,
    //)
    FuncEnd,
    //{
    BlockBegin,
    //}
    BlockEnd,
    //[
    ArrayBegin,
    //]
    ArrayEnd,
    //:
    Colon,
    //;
    Semicolon,
    //,逗号
    And,
}

#[derive(Debug,PartialEq)]
pub enum Compared {
    ///!=
    NotEquals,
    ///==
    Equals,
    ///>
    GreaterThan,
    ///<
    LessThan,
    ///>=
    GreaterThanOrEquals,
    ///<=
    LessThanOrEquals,
}
#[derive(Debug,PartialEq)]
pub enum KeyWord {
    ///func
    Func,
    ///class
    Class,
    ///if
    If,
    ///true
    True,
    ///false
    False,
    ///null
    Null,
    //
    Else,
    Return,
    While,
    For,
    Goto,
    Continue,
}

#[derive(Debug,PartialEq)]
pub enum Operator {
    Any,
    /// =
    Assignment,
    /// +
    Add,
    /// -
    Sub,
    /// *
    Mul,
    /// /
    Div,
    /// <<
    ShiftLeft,
    /// >>
    ShiftRight,
    /// !
    Negate,
}
